Teacher Version

Hero Image
Hero Image

Loop with Sensor Control

Topics Covered

Virtual Robot: MoveLoopDistanceVR.rbg

Physical Robot: MoveLoopDistance.rbg

Check Your Understanding

  1. When the Loop is set to use the distance sensor, as shown below, what "condition" will cause it to let Program Flow pass (instead of sending it in)?
    1. The bump sensor is in a pressed state when the robot starts running the program.
    2. There is no object in front of the robot.
    3. An object placed 341 mm away from the Distance Sensor.
    4. An object placed 56 mm away from the Distance Sensor.
  2. What is the correct type of Repeat Loop to use if you want it to be controlled by a sensor?
    1. A repeat(forever) Block
    2. A repeat Block
    3. A repeatUntil Block
    4. Any Repeat Block types will work
  3. When does a repeatUntil Loop check the sensor?
    1. Continuously while inside the Loop
    2. At the beginning and end of the Loop
    3. At the end of the Loop only
    4. At the end of every block within the Loop

ClosedClick here for the Answers

D. An object placed 56 mm away from the Distance Sensor.

C. A repeatUntil Block

B. At the beginning and end of the Loop

© 2016 Robomatter, Inc.

Portions of this product are manufactured under license from Carnegie Mellon University.